//---------------------------------------------------------------------------
/**
 * \class CFileWalker
 * \brief This is a class to recursively traverse file & directory
 * \version 0.1
 *
 * \author Woo-Hyun Kim (woorung@nhncorp.com, woorung@gmail.com)
 * \author http://blog.naver.com/wisereign .
 *
 * \date 2002/04/29
 */
//---------------------------------------------------------------------------
#ifndef CFileWalkerH
#define CFileWalkerH
//---------------------------------------------------------------------------
#include <iostream>
#include <iterator>
#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <fstream>
#include <string>

#include <strings.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <limits.h>

using namespace std;
//---------------------------------------------------------------------------
class CFileWalker {
private :
	int level;

protected :
	virtual bool DirectoryProcess(char *pszStartPath);
	virtual bool RegularProcess(char *pszStartPath);
	virtual bool BlockProcess(char *pszStartPath);
	virtual bool CharProcess(char *pszStartPath);
	virtual bool FifoProcess(char *pszStartPath);
	virtual bool FlnkProcess(char *pszStartPath);
	virtual bool SockProcess(char *pszStartPath);
	virtual bool FdirProcess(char *pszStratPath);

public :
	CFileWalker();
	virtual ~CFileWalker();

	bool StartWalking(char *pszStartPath);
	bool StartWalking(char *pszStartPath, int limit);
};
//---------------------------------------------------------------------------
#endif
